Skip to content

test(sdk): EVM clear-sign runtime-signer test train + offline parity gate#340

Merged
BitHighlander merged 1 commit into
developfrom
test/sdk-clearsign-runtime-signer
Jul 8, 2026
Merged

test(sdk): EVM clear-sign runtime-signer test train + offline parity gate#340
BitHighlander merged 1 commit into
developfrom
test/sdk-clearsign-runtime-signer

Conversation

@BitHighlander

Copy link
Copy Markdown
Collaborator

Summary

Recovers the keepkey-sdk clear-sign tests that had been sitting untracked on disk. Complements the loadClearsignSigner SDK method already on develop (#337) — these are the tests that exercise it. All test-only, no source changes.

  • _clearsign.js — shared blob builder; reproduces python-keepkey @1545299's signed-metadata format byte-for-byte (deterministic tx + real legacy sighash, CI test key slot 3).
  • clearsign-offline-parity.jsno-device gate: 51/51 catalog flows match python's REFERENCE_BLOB_SNAPSHOTS (blob sha256+len + JS sighash). Cheapest guard against serializer drift.
  • evm-clearsign/loadsigner-sign-flows.js + clearsign-signer-flows.js — on-device train: load the CI signer via /eth/clearsign/load-signer, then sign flagship flows with the bound metadata blob (self + pioneer modes).
  • evm-clearsign/relay-v2-schema-flow.js — relay v2 static-schema flow.
  • fixtures/clearsign-golden.json — golden vectors dumped from python-keepkey (test key, slot 3, 51 flows + snapshots).

Test plan

  • node tests/clearsign-offline-parity.js → 51/51 green (no device)
  • On-device (self mode) against an emulator/device running clearsign firmware — pending

…gate

Recovers the keepkey-sdk clear-sign tests that had been sitting untracked.
Complements the loadClearsignSigner SDK method already on develop (#337);
these are the tests that exercise it.

- _clearsign.js: shared blob builder — reproduces python-keepkey @1545299's
  signed-metadata format byte-for-byte (deterministic tx + real legacy
  sighash, CI test key slot 3).
- clearsign-offline-parity.js: no-device gate — 51/51 catalog flows match
  python's REFERENCE_BLOB_SNAPSHOTS (blob sha256+len + JS sighash). The
  cheapest guard against serializer drift; verified 51/51 green.
- evm-clearsign/loadsigner-sign-flows.js + clearsign-signer-flows.js:
  on-device train — load CI signer via /eth/clearsign/load-signer, then
  sign flagship flows with the bound metadata blob (self + pioneer modes).
- evm-clearsign/relay-v2-schema-flow.js: relay v2 static-schema flow.
- fixtures/clearsign-golden.json: golden vectors dumped from python-keepkey
  (test key, slot 3, 51 flows + snapshots).
@BitHighlander BitHighlander requested a review from pastaghost as a code owner July 8, 2026 23:32
@BitHighlander BitHighlander merged commit 4da5a56 into develop Jul 8, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant